package com.thti.mecool.client.command;

import java.util.Hashtable;

import com.thti.mecool.client.command.result.communication.AddCommunicationCommand;
import com.thti.mecool.client.command.result.communication.SearchCommunicationCommand;
import com.thti.mecool.client.command.result.location.LocationCommand;
import com.thti.mecool.client.command.result.plan.AddPlanCommand;
import com.thti.mecool.client.command.result.plan.GetPlanProjectCommand;
import com.thti.mecool.client.command.result.plan.MyPlanCommand;
import com.thti.mecool.client.command.result.plan.MyPlanJobCommand;
import com.thti.mecool.client.command.result.plan.PlanCommand;
import com.thti.mecool.client.command.result.plan.PlanUnfinishedCommand;
import com.thti.mecool.client.command.result.plan.TaskCommand;
import com.thti.mecool.client.command.result.plan.UploadImageCommand;
import com.thti.mecool.client.command.result.plan.UploadPlanCommand;
import com.thti.mecool.client.command.result.sellinto.EditSellIntoCommand;
import com.thti.mecool.client.command.result.sellinto.SellIntoCommand;
import com.thti.mecool.client.command.result.system.GetProjectCommand;
import com.thti.mecool.client.command.result.system.VersionCommand;
import com.thti.mecool.client.command.result.user.LoginCommand;
import com.thti.mecool.client.command.result.user.UpdateUserCommand;
import com.thti.mecool.client.command.result.work.AddWorkmemoCommand;
import com.thti.mecool.client.command.result.work.DeleteWorkmemoCommand;
import com.thti.mecool.client.command.result.work.GetWorkmemoChannelCommand;
import com.thti.mecool.client.command.result.work.GetWorkmemoCommand;
import com.thti.mecool.client.command.result.work.UpdateWorkmemoCommand;
public class ManageCommand {
	
	public static Hashtable<String, ICommand> commads = new Hashtable<String, ICommand>();

	public ManageCommand(){
		/**
		 * 用户登录
		 */
		LoginCommand loginCommand=new LoginCommand();
		addCommand(loginCommand);
		/**
		 * 用户修改密码
		 */
		UpdateUserCommand updateUserCommand=new UpdateUserCommand();
		addCommand(updateUserCommand);
		/**
		 * 获取沟通管理
		 */
		SearchCommunicationCommand searchCommunicationCommand=new SearchCommunicationCommand();
		addCommand(searchCommunicationCommand);
		/**
		 * 获取沟通的项目及终端
		 */
		GetProjectCommand getProjectCommand=new GetProjectCommand();
		addCommand(getProjectCommand);
		/**
		 * 添加沟通管理
		 */
		AddCommunicationCommand addCommunicationCommand=new AddCommunicationCommand();
		addCommand(addCommunicationCommand);
		/**
		 * 获取工作备忘
		 */
		GetWorkmemoCommand getWorkmemoCommand=new GetWorkmemoCommand();
		addCommand(getWorkmemoCommand);
		/**
		 * 添加工作备忘
		 */
		AddWorkmemoCommand addWorkmemoCommand=new AddWorkmemoCommand();
		addCommand(addWorkmemoCommand);
		/**
		 * 修改工作备忘
		 */
		UpdateWorkmemoCommand updateWorkmemoCommand=new UpdateWorkmemoCommand();
		addCommand(updateWorkmemoCommand);
		/**
		 * 删除工作备忘
		 */
		DeleteWorkmemoCommand deleteWorkmemoCommand=new DeleteWorkmemoCommand();
	    addCommand(deleteWorkmemoCommand);
	    /**
		 * 获取工作备忘的所有终端
		 */
	     GetWorkmemoChannelCommand getWorkmemoChannelCommand=new GetWorkmemoChannelCommand();
	     addCommand(getWorkmemoChannelCommand);
	     /**
	      * 获取计划任务
	      */
	     PlanCommand planCommand=new PlanCommand();
	     addCommand(planCommand);
	     /**
	      * 添加计划
	      */
	     AddPlanCommand addPlanCommand=new AddPlanCommand();
	     addCommand(addPlanCommand);
	     /**
	      * 获取计划的项目及终端
	      */
	     GetPlanProjectCommand getPlanProjectCommand=new GetPlanProjectCommand();
	     addCommand(getPlanProjectCommand);
	     /**
	      * 
	      */
	     TaskCommand taskCommand=new TaskCommand();
	     addCommand(taskCommand);
	     /**
	      * 卖进管理终端
	      */
	     SellIntoCommand sIntoCommand=new SellIntoCommand();
	     addCommand(sIntoCommand);
	     /**
	      * 卖进表修改
	      */
	     EditSellIntoCommand eIntoCommand=new EditSellIntoCommand();
	     addCommand(eIntoCommand);
	     /**
	      * 我的计划
	      */
	     MyPlanJobCommand myPlanJobCommand=new MyPlanJobCommand();
	     addCommand(myPlanJobCommand);
	     /**
	      * 上传图片
	      */
	     UploadImageCommand uploadImageCommand=new UploadImageCommand();
	     addCommand(uploadImageCommand);
	     /**
	      * 上传任务
	      */
	     UploadPlanCommand uploadPlanCommand=new UploadPlanCommand();
	     addCommand(uploadPlanCommand);
	     /**
	      * 上传经纬度
	      */
	     LocationCommand locationCommand=new LocationCommand();
	     addCommand(locationCommand);
	     /**
	      * 获取我的计划
	      */
	     MyPlanCommand myPlanCommand=new MyPlanCommand();
	     addCommand(myPlanCommand);
	     
	     VersionCommand versionCommand=new VersionCommand();
	     addCommand(versionCommand);     
	     /**
	      * 
	      */
	     PlanUnfinishedCommand planUnfinishedCommand=new PlanUnfinishedCommand();
	     addCommand(planUnfinishedCommand);
	} 
	
	
	public static void addCommand(ICommand command) {	
		commads.put(command.getCommandID(), command);
	}

	public static void deleteCommand(String key) {
		commads.remove(key);
	}

}
